<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="s" uri="/struts-tags"%>

<div id="content">
							<!-- Begin Post -->
					
						<!-- End Post -->
						<!-- Begin Products -->
						<div id="productdetail">
							<h2>Chi tiet san pham<span class="title-bottom">&nbsp;</span></h2>
							
							<div class="productdetail">
								<a href="#" title="Product 1">									
									<img src="/resource/image/<s:property value='product.image'/>" alt="Product Image 1" />
									<span class="title"><s:property value='product.name'/></span>									
								</a>
								
							</div>
							<div id="windows">
								<h2><s:property value='product.name'/><span class="title-bottom"><s:property value='product.name'/>&nbsp;</span></h2>
								<h3 style="color: red;"><span>Pice: </span><span class="title-bottom">$&nbsp;<s:property value='product.pice'/></span></h3>
								
								
								<div><h3 style="color: red;">Factory : &nbsp;<s:property value='product.factory.getName()'/></h3>	</div>
								
								<!-- Maker Card Product -->
								
								<form action="BuyProduct" id="buyproduct" method="post">
								
								
								<input type="hidden" name="idbuyProduct" value="<s:property value='product.id'/>" />  
								
																
								<div class="buttonslogin"  style="padding: 20px 10px 20px ;text-align :left ;">
                                     <a class="button" id="btnbuyproduct" href="#">Buy Now</a>  <br>
                                                                        
                                </div> 	
                                	<div  style="color: red;"><s:property value='messenger'/></div> 
                                <h3 style="color: white">Number</h3><input style="width: 50px; height: 20px;" type="text" name= "warranty1"  class="required number" value="1" min="1" max="10"/>
                                
                                </form>	
                                <!-- finish maker Card -->				
							</div>
											
							<div class="cl">&nbsp;</div>
						</div>
						<div class="post">
							<h2>Thong tin chi tiet<span class="title-bottom">&nbsp;</span></h2>
								<div class="CSSTableGenerator">
												<table >
													<tr>
														<td>															
														</td>
														<td style="color: red;">
															Info About Product
														</td>
													
													</tr>
													<tr>
														<td style="color: green;">
															<h3>Name</h3>
														</td>
														<td style="color: green;">
															<h3><s:property value='product.name'/></h3>
														</td>
													
													</tr>
													<tr>
														<td style="color: green;">
															<h3>Factory</h3>
														</td>
														<td style="color: green;">
															<h3><s:property value='product.factory.getName()'/></h3>
														</td>
													
													</tr>
													<tr>
														<td style="color: green;">
															<h3>PC</h3>
														</td>
														<td style="color: green;">
															<h3><s:property value='product.info'/></h3>
														</td>
													
													</tr>
													<tr>
														<td style="color: green;">
															<h3>Warranty</h3>
														</td>
														<td style="color: green;">
															<h3><s:property value='product.warranty'/>&nbsp;Month</h3>
														</td>
													
													</tr>
													<tr>
														<td style="color: green;">
															<h3>Catalogy</h3>
														</td>
														<td style="color: green;">
															<h3><s:property value='product.categogy.getName()'/></h3>
														</td>
													
													</tr>
													<tr>
														<td style="color: green;">
															<h3>Pice</h3>
														</td>
														<td style="color: green;">
															<h3><s:property value='product.pice'/></h3>
														</td>
													
													</tr>
												</table>
											</div>
						</div>
						<!-- End Products -->
						<!----Binh luan---->
						<s:iterator value="lstcomment" var="lstcmt" status="status">
						<div class="comment">
							<h3 style="color: blue;"><s:property value='#lstcmt.member.getFullname()'/><span class="title-bottom">&nbsp;</span></h3>
							&nbsp;&nbsp;&nbsp;<h3 style="color:white;"><s:property value='#lstcmt.info'/></h3>
						</div>
						</s:iterator>						
						<!-----------------------Nhap binh luan------------------->
						
						  <form action="addcmt" id="comment-form" method="post" >                    
                                                    <fieldset>                                                                                 
                                                          <div class="wrapper">
                                               
                                                            <div class="text-form"> <h3>Comment</h3></div>
                                                            <div class="extra-wrap">
															&nbsp;&nbsp;
                                                                <textarea name="comment.info" ></textarea> 
                                                                <input type="hidden" name="idProduct" value="<s:property value='product.id'/>" />                                                                                                                                                                                                                                                          
                                                                <div class="clear"></div>
                                                                <div class="buttons">
                                                                    <a  class="button" href="#">Reset</a>
                                                                    <a  class="button" id ="post" href="#" >Post</a>
                                                                </div> 
                                                            </div>
                                                          </div>                            
                                                    </fieldset>						
                                                </form>
                                                
												<!----------------------ket thuc-Nhap binh luan------------------->
						
					</div>
<script type="text/javascript">
$(document).ready( 
		function() {
				$("#post").click(function(){
 				$("#comment-form").submit();				
				});
		});
$(document).ready( 
		function() {
				$("#btnbuyproduct").click(function(){
 				$("#buyproduct").submit();				
				});
});								

</script>
							